home *** CD-ROM | disk | FTP | other *** search
/ Treccani Italiana Di Scienze Lettere Ed Arti / [Enciclopedia] Treccani Italiana di scienze lettere ed arti.iso / pc / data / xxi_appendice_dvd.swf / scripts / __Packages / mx / styles / StyleManager.as < prev   
Text File  |  2007-11-08  |  2KB  |  40 lines

  1. class mx.styles.StyleManager
  2. {
  3.    static var inheritingStyles = {color:true,direction:true,fontFamily:true,fontSize:true,fontStyle:true,fontWeight:true,textAlign:true,textIndent:true};
  4.    static var colorStyles = {barColor:true,trackColor:true,borderColor:true,buttonColor:true,color:true,dateHeaderColor:true,dateRollOverColor:true,disabledColor:true,fillColor:true,highlightColor:true,scrollTrackColor:true,selectedDateColor:true,shadowColor:true,strokeColor:true,symbolBackgroundColor:true,symbolBackgroundDisabledColor:true,symbolBackgroundPressedColor:true,symbolColor:true,symbolDisabledColor:true,themeColor:true,todayIndicatorColor:true,shadowCapColor:true,borderCapColor:true,focusColor:true};
  5.    static var colorNames = {black:0,white:16777215,red:16711680,green:65280,blue:255,magenta:16711935,yellow:16776960,cyan:65535,haloGreen:8453965,haloBlue:2881013,haloOrange:16761344};
  6.    static var TextFormatStyleProps = {font:true,size:true,color:true,leftMargin:false,rightMargin:false,italic:true,bold:true,align:true,indent:true,underline:false,embedFonts:false};
  7.    static var TextStyleMap = {textAlign:true,fontWeight:true,color:true,fontFamily:true,textIndent:true,fontStyle:true,lineHeight:true,marginLeft:true,marginRight:true,fontSize:true,textDecoration:true,embedFonts:true};
  8.    function StyleManager()
  9.    {
  10.    }
  11.    static function registerInheritingStyle(styleName)
  12.    {
  13.       mx.styles.StyleManager.inheritingStyles[styleName] = true;
  14.    }
  15.    static function isInheritingStyle(styleName)
  16.    {
  17.       return mx.styles.StyleManager.inheritingStyles[styleName] == true;
  18.    }
  19.    static function registerColorStyle(styleName)
  20.    {
  21.       mx.styles.StyleManager.colorStyles[styleName] = true;
  22.    }
  23.    static function isColorStyle(styleName)
  24.    {
  25.       return mx.styles.StyleManager.colorStyles[styleName] == true;
  26.    }
  27.    static function registerColorName(colorName, colorValue)
  28.    {
  29.       mx.styles.StyleManager.colorNames[colorName] = colorValue;
  30.    }
  31.    static function isColorName(colorName)
  32.    {
  33.       return mx.styles.StyleManager.colorNames[colorName] != undefined;
  34.    }
  35.    static function getColorName(colorName)
  36.    {
  37.       return mx.styles.StyleManager.colorNames[colorName];
  38.    }
  39. }
  40.